home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_actor_glowbug.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
2KB
|
105 lines
# Jones 3D Cog Script
#
# actor_Glowbug.cog
#
# [RT]
#
# Pulses the Glowbug's light.
#
# (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
#
# ===================================================================
symbols
message sighted
message aievent
message removed
message killed
message pulse
thing shrimpy local
template glow=lensflarew local
template sparks=bugsparks local
thing t_glow local
end
# ===================================================================
code
# -------------------------------------------------------------------
sighted:
shrimpy = GetSenderRef();
SetThingUserData(shrimpy, AttachThingToThingMesh(shrimpy, glow, 0));
SetThingLight(shrimpy, '0.35 0.35 0.55', 1.0, 0.9);
SetThingPulse(shrimpy, 1.0);
PlaySoundClass(shrimpy, 1); # Play create sound
return;
# -------------------------------------------------------------------
aievent:
if (BITTEST(GetParam(0), 0x8604))
{
ReturnEx(1);
}
return;
# -------------------------------------------------------------------
killed:
shrimpy = GetSenderRef();
SetThingPulse(shrimpy, 0.0);
ClearThingFlags(shrimpy, 0x1);
DetachThingMesh(GetThingUserData(shrimpy));
SetThingUserData(shrimpy, -1);
return;
# -------------------------------------------------------------------
removed:
shrimpy = GetSenderRef();
# If theres still a sprite attached, remove it
if ( GetThingUserData(shrimpy) > -1 )
{
DetachThingMesh(GetThingUserData(shrimpy));
}
return;
# -------------------------------------------------------------------
pulse:
shrimpy = GetSenderRef();
if (VectorX(GetThingLight(shrimpy)) > 0.1)
{
SetThingLight(shrimpy, '0.65 0.65 0.35', 1.0, 0.9);
AnimateSpriteSize(GetThingUserData(shrimpy), '0.4 0.4 0.4', '0.5 0.5 0.5', 0.5);
}
else
{
SetThingLight(shrimpy, '0.85 0.85 0.55', 1.0, 0.9);
AnimateSpriteSize(GetThingUserData(shrimpy), '0.5 0.5 0.5', '0.4 0.4 0.4', 0.5);
}
CreateThing(sparks, shrimpy);
return;
end